package org.flexspeedup.blog.events
{
import com.cristinasboxof.common.models.Project;

import flash.events.Event;

/**
 * Selects a project in the model
 */
public class SelectProjectEvent extends Event
{
    //--------------------------------------------------------------------------
    //
    //  Class Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------
    // ID
    //--------------------------
    /**
     * Unique id for this event.
     */
    public static const ID:String = "SelectProjectEvent";
    
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new instance of the <code>SelectProjectEvent</code> event 
     */    
    public function SelectProjectEvent(project:Project)
    {
        super(ID, true, true);
        _project = project;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  project
    //----------------------------------

    /**
     *  @private
     */
    private var _project:Project;

    /**
     * the project to select in the model
     */
    public function get project():Project
    {
        return _project;
    }

    //--------------------------------------------------------------------------
    //
    //  Overridden Methods - Event
    //
    //--------------------------------------------------------------------------

    /**
     * @inheritdoc flash.events.Event#clone
     */
    override public function clone():Event
    {
        return new SelectProjectEvent(project);
    }
}
}